package o;

import android.annotation.SuppressLint;
import android.content.Context;

public final class ecp {
    private static final byte[] ˎ = new byte[0];
    private static ecp ˏ = null;
    private static final Object ॱ = new Object();
    private final eco ˊ;
    private String ˋ;
    private String ᐝ;

    private ecp(Context context) {
        this.ˊ = new eco(context.getSharedPreferences("DrmSession", 0));
    }

    public static ecp ˏ() {
        ecp o_ecp;
        synchronized (ॱ) {
            if (ˏ == null) {
                ˏ = new ecp(ContentManager.getInstant().getContext());
            }
            o_ecp = ˏ;
        }
        return o_ecp;
    }

    @SuppressLint({"TrulyRandom"})
    public String ˋ() {
        String str;
        synchronized (ˎ) {
            if (this.ˋ == null) {
                this.ˋ = this.ˊ.ˊ("com.huawei.appmarket.drm.secret.key", null);
                if (this.ˋ == null || this.ˋ.length() < 32) {
                    this.ˋ = ˊ("com.huawei.appmarket.drm.secret.key");
                }
            }
            str = this.ˋ;
        }
        return str;
    }

    public String ˊ() {
        String str;
        synchronized (ॱ) {
            if (this.ᐝ == null) {
                this.ᐝ = this.ˊ.ॱ("com.huawei.appmarket.drm.iv", null);
                if (this.ᐝ == null) {
                    this.ᐝ = dnk.ˏ(evh.ˋ());
                    this.ˊ.ˋ("com.huawei.appmarket.drm.iv", this.ᐝ);
                }
            }
            str = this.ᐝ;
        }
        return str;
    }

    private String ˊ(String str) {
        String ˋ = doj.ˋ();
        this.ˊ.ˏ(str, ˋ);
        return ˋ;
    }
}
